﻿using System;

namespace Useful.MVP2
{
    public interface IListView : IView
    {
        event EventHandler<EventArgs> RefreshClicked;
        event EventHandler<EventArgs> AddClicked;
        event EventHandler<EventArgs> EditClicked;
        event EventHandler<EventArgs> DeleteClicked;

        event EventHandler<EventArgs> CurrentItemPositionChanged;

        object ListDataSource { get; set; }
        object GetCurrentItem();

        bool EnableView { get; set; }
        bool EnableAdd { get; set; }
        bool EnableEdit { get; set; }
        bool EnableDelete { get; set; }

        void Init(object repository, bool allowView, bool allowAdd, bool allowEdit, bool allowDelete);
        event EventHandler<InitListViewEventArgs> ViewInited;
    }
}
